package cn.cloudplug.friendsrecommend.view;

import cn.cloudplug.friendsrecommend.R;
import cn.cloudplug.friendsrecommend.util.Constant;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

public class MyDataItemView extends LinearLayout{

	private TextView tv_title;
	private TextView tv_content;
	public MyDataItemView(Context context, AttributeSet attrs) {
		super(context, attrs);
		setView(context);
		fillData(attrs);
	}

	private void fillData(AttributeSet attrs) {
		String text_title=attrs.getAttributeValue(Constant.NAMESPACE,"text_title");
		String text_content=attrs.getAttributeValue(Constant.NAMESPACE,"text_content");
		tv_title.setText(text_title);
		tv_content.setText(text_content);
	}

	private void setView(Context context) {
		View.inflate(context, R.layout.item_my_data, this);
		tv_title=(TextView) findViewById(R.id.tv_title);
		tv_content=(TextView)findViewById(R.id.tv_content);
	}

	public TextView getTv_title() {
		return tv_title;
	}

	public void setTv_title(TextView tv_title) {
		this.tv_title = tv_title;
	}

	public TextView getTv_content() {
		return tv_content;
	}

	public void setTv_content(TextView tv_content) {
		this.tv_content = tv_content;
	}

	
}
